from pydantic import BaseModel
from typing import Optional
from datetime import datetime

class FileInfo(BaseModel):
    id: int
    name: str
    file_type: str
    size: int
    mime_type: Optional[str] = None
    parent_id: Optional[int] = None
    owner_id: int
    level: Optional[int] = None
    share_level: Optional[str] = None
    description: Optional[str] = ""
    tags: Optional[str] = ""
    created_at: datetime
    updated_at: Optional[datetime] = None

class FileCreate(BaseModel):
    name: str
    parent_id: Optional[int] = None
    description: Optional[str] = ""
    tags: Optional[str] = ""

class FolderCreate(BaseModel):
    name: str
    parent_id: Optional[int] = None
    description: Optional[str] = ""
    tags: Optional[str] = ""